package cn.jane.rpc.netty.transport;

import java.io.Closeable;
import java.net.SocketAddress;
import java.util.concurrent.TimeoutException;

/**
 * 客户端接口 TODO
 */
public interface TransportClient extends Closeable {

    /**
     * TODO
     * @param address
     * @param connectionTimeout
     * @return
     * @throws InterruptedException
     * @throws TimeoutException
     */
    Transport createTransport(SocketAddress address, long connectionTimeout) throws InterruptedException, TimeoutException;

    @Override
    void close();
}
